<!-- BEGIN PAGE HEADING ROW -->
<?php echo $this->Html->script('tinymce/js/tinymce/tinymce.min');?>

<div class="row">
	<div class="col-lg-12">
		<!-- BEGIN BREADCRUMB -->
		<div class="breadcrumbs">
			<ul class="breadcrumb">
				<li> <a href="<?= $this->webroot.'admin' ?>">Trang chủ</a> </li>
				<li> <a href="<?= $this->webroot.'admin' ?>/images/images ?>">Danh sách hình ảnh</a> </li>
				<li class="active">Thêm mới</li>
			</ul>
		</div>
		<!-- END BREADCRUMB -->

		<div class="page-header">
			<h1>Thêm mới</h1>
		</div>

		<?php echo $this->element('layout/layout-options')?>

	</div><!-- /.col-lg-12 -->
</div><!-- /.row -->
<!-- END PAGE HEADING ROW -->


<div class="row">
	<div class="col-lg-12">


	<?php echo $this->Session->flash(); ?>

		<div class="portlet portlet-default">
			<div class="portlet-heading">
				<div class="portlet-title">
					<h4>Thêm mới</h4>
				</div>
				<div class="portlet-widgets">
					<a data-toggle="collapse" data-parent="#accordion" href="#f-3" class=""><i class="fa fa-chevron-down"></i></a>
				</div>
				<div class="clearfix"></div>
			</div>
			<div id="f-3" class="panel-collapse collapse in">
				<div class="portlet-body">
					<?php $als = 'Image'; echo $this->Form->create($als, array('class' => 'form-horizontal', 'type' => 'file'));?>
						<div class="form-group">
							<label class="col-sm-2 control-label">Hình ảnh</label>
							<div class="col-sm-9">
								<div class="item mb10 clearfix">
									<input type="file" class="form-control input-xlarge fl mr10" name="data[<?= $als ?>][images][]"/>
									<a href="#" class="btn btn-line btn-primary add"><i class="fa fa-plus icon-only"></i></a>
									<a href="#" class="btn btn-line btn-danger del hide"><i class="fa fa-trash-o icon-only"></i></a>
								</div>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label">Loại</label>
							<div class="col-sm-9">
								<div class="item mb10 clearfix">
								<div class="tcb">
									<label class="tcb-inline">
										<input type="radio"  class="tc form-control" name="data[Image][target_id]" value="0" <?php echo !isset($target_id) || $target_id == 0 ? 'checked="checked"' : '' ?> />
										<span class="labels"> Đối tác</span>
									</label>
									<label class="tcb-inline">
										<input type="radio"  class="tc form-control" name="data[Image][target_id]" value="-1" <?php echo isset($target_id) && $target_id == -1 ? 'checked="checked"' : '' ?>  />
										<span class="labels"> Trang chủ</span>
									</label>
								</div>
								</div>
							</div>
						</div>

						<div class="form-actions">
							<div class="form-group">
								<div class="col-sm-offset-2 col-sm-9">
									<button type="submit" class="btn btn-default">Lưu</button>
									<a href="<?= $this->webroot.'admin' ?>/images/images" class="btn">Hủy bỏ</a>
								</div>
							</div>
						</div>
					<?php echo $this->Form->end( ); ?>
				</div>
			</div>
		</div>

	</div><!-- /.col-lg-12  fa-times-->
</div><!-- /.row -->


<?php
	echo $this->Html->script('functions');
	echo $this->Html->script('product/add');
?>
